define(["ajaxBase", "getPath"], function (ajaxBase, getPath) {
    function verifyLoginStatus(data) {
        if (!data || data.statusCode !== 1) {
            window.open(getPath.getRootPathWeb() + '/' + 'login', '_self')
        }
    }

    function loginVerify() {
        let data = {},
            url = '/login/status',
            method = 'POST'
        ajaxBase(data, url, method).then(function (msg) {
            verifyLoginStatus(msg)
        })
    }

    return loginVerify
})